package org.jeecg.modules.vx.student.controller;


import io.swagger.annotations.Api;
import org.jeecg.common.api.vo.Result;

import org.jeecg.modules.vx.student.entity.Student;
import org.jeecg.modules.vx.student.service.IStudentService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author li
 * @since 2021-08-15
 */
@RestController
@RequestMapping("/vx")
@Api("微信端")
public class StudentController {
    @Resource
    private IStudentService iStudentService;

    @GetMapping("/login")
    public Result login(String code){

        Student student = iStudentService.login(code);

            if (student==null){
                return Result.error("用户不存在",3000);
        }
        return Result.ok(student);
    }
}

